package com.micromap.dataprocessing.domain

import java.time.LocalDate
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

@Entity
@Table(name = "T_AAA_AUTH_PROPERTY")
class AuthProperty {
    //"属性ID"
    @Id
    var propertyId: Long? = null
    //"属性编码"
    var propertyCode: String? = null
    //"名称"
    var name: String? = null
    //"层级类型：0=单一维度，1=层级维度 "
    var tierType: Int? = null
    //"描述"
    var des: String? = null
    //"0=禁用，1=启用"
    var enabled: Int? = null
    //"0=不可见，1=可见"
    var isVisibility: Int? = null
    //"0=不是，1=是"
    var isTwins: Int? = null
    //"0=不是，1=是"
    var isLeafCheck: Int? = null
    var version: Long? = null
    var crtUserId: String? = null
    var crtUserName: String? = null
    var crtDate: LocalDate? = null
    var mntUserId: String? = null
    var mntUserName: String? = null
    var mntDate: LocalDate? = null

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as AuthProperty

        if (propertyId != other.propertyId) return false

        return true
    }

    override fun hashCode(): Int = propertyId?.hashCode() ?: 0

}
